#!/usr/bin/env python

"""
Dtella - Configuration Manager
Copyright (C) 2009-      Andrew Cooper <andyhhp@hotmail.com>

$Id$

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
"""
##
#@package dtella.config.defaults
#@authors Andrew Cooper
#
#@brief dtella configuration manager
#
#Contains container classes for the default values of options in local_config.py
#and bridge_config.py

##
#@file defaults.py
#@authors Andrew Cooper
#
#@brief dtella configuration manager
#
#Contains container classes for the default values of options in local_config.py
#and bridge_config.py

##@brief Container class for values in local_config.py
#
#Contains default values for all valid variables in local_config.py.
#Default values should be overwritten with network specific ones from the
#user-customized local_config.py at startup.
class LocalDefaults:

    ##List of IP addresses of local DNS servers to aid in reverse DNS lookups
    rdns_servers = []
    
    ##TCP port to open for communication with other nodes
    tcp_port = 41235
    
    ##UDP port for interaction with other nodes
    udp_port = 41236
    
    ##Build Prefix when generating releases
    build_prefix = "dtella-"
    
    ##Version information
    version = "0.0.0"
    
    ##Network key for simple symetric encryption of protocol
    network_key = 'CHANGEME'
    
    ##Hubname as shown in clients
    hub_name = "Dtella@Here"
    
    ##Client protocol to use
    client_protocol = 'ADC/1.0'
    
    ##Prevent clients from using unencrypted communcation
    client_fcrypto = True
    
    ##Minimum sharesize to join
    minshare_cap = 10 * (1024**2)
    
    ##List of subnets allowed to join the network
    allowed_subnets = []
    
##@brief Container class for values in bridge_config.py
#
#Contains default values for all valid variables in bridge_config.py.
#Default values should be overwritten with network specific ones from the
#user-customized bridge_config.py at startup.    
class BridgeDefaults:

    ##IRC server address
    irc_server = ""
    
    ##IRC port
    irc_port = 6667
    
    ##Use SSL to access the IRC server
    irc_ssl = False
    
    ##IRC password
    irc_password = ""
    
    ##IRC network name
    irc_network_name = ""
    
    ##My hostname as required by the upstream IRC server
    my_host = "bridge1.somedomain.com"
    
    ##My full name as seen in IRC
    my_name = "Dtella IRC Bridge"
    
    ##IRC channel to use
    irc_chan = "#dtella"
    
    ##IRC Hostmask prefix
    hostmask_prefix = ""
    
    ##IRC Hostmask keys
    hostmask_keys = ["key1", "key2", "key3"]
    
    ##Bridge nickname in DC clients
    irc_to_dc_bot = "*IRC"
    
    ##Bridge nickname in IRC
    dc_to_irc_bot = "DtellaBridge"
    
    ##Virtual IRC nicknames to inject into the DC network view
    virtual_nicks = []
    
    ##Prefix for DC users in IRC
    dc_to_irc_prefix = '|'
    
    ##Prefix for IRC users in DC
    irc_to_dc_prefix = '~'
    
    ##Maximum IRC nickname length
    max_irc_nick_len = 30
    
    ##File basename for logs etc
    file_base = "dtella_bridge"
    
    ##My IP address to add to the bootstrapping data
    myip_hint = ''
    
    ##Cache of reliable nodes for bootstrapping
    ip_cache = []
    
    ##Private key for signing all messages
    private_key = ()
    
    ##How often to update the DNS bootstrapping data
    dconfig_push_interval = 60*60
    